package com.jzo2o.customer.util;

import java.util.regex.Pattern;

public class EncodeUtil {
    // 定义密码的正则表达式
    public static final String PASSWORD_PATTERN = "^(?=.*\\d)(?=.*[a-z]).{5,30}$";
    public static final String REGISTRY_CODE = "registryCode::";
    public static final String RESET_PASSWORD_CODE = "resetPassWord::";

    // 编译正则表达式
    public static final Pattern pattern = Pattern.compile(PASSWORD_PATTERN);
    public static boolean isValidPassword(String password) {
        if (password == null){
            return false;
        }
        return pattern.matcher(password).matches();
    }
}
